<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../css/swiper-4.3.5.min.css">
    <link rel="stylesheet" href="../css/element.css">
    <link rel="stylesheet" href="../css/main.css">
    <link rel="stylesheet" href="../css/integral/integral_shop.css">
    <title>用户反馈</title>
</head>

<body>
<headers</headers>
    <div id="app" v-cloak>
        <headers></headers>
        <!-- search -->
        <div class="search wrap">
            <logo></logo>
            <div class="fl">
                <p class="feedback_tit">用户反馈</p>
            </div>
        </div>

        <div class="red_line wrap">

        </div>

        

        <div class="feedback_box wrap">
            <div class="fl thanks_box">
                <div class="thank_tit">
                    提交意见
                </div>
                <div class="thanks">
                    <p>尊敬的用户：</p>
                    <p>您好！为了给您提供更好的服务，我们希望收集您使用本网站时的看法或建议。对您的配合和支持表示衷心感谢！</p>
                </div>

                <div class="input_box">
                    <textarea name="" v-model='content' id="" cols="" rows="" class="input_content"></textarea>
                </div>
                <div class="sub_notes">我们会关注您的反馈，不断优化产品，为您提供更好的服务！</div>
                <div class="input_write">
                    <span class="input_tit">姓名</span><input type="text" v-model='name' class="input_text">
                </div>
                <div class="input_write">
                    <span class="input_tit">手机号</span><input type="text" v-model='phone' class="input_text">
                </div>

                <div class="cursor feekback_btn" @click='saveSysFeedBack'>
                    提交
                </div>
            </div>
            <div class="fl line">

            </div>
            <div class="feedback_list fl">
                <div class="thank_tit">
                    我的反馈（{{list.length}}）
                </div>
                <div class="feedback_item clear_both" v-for='(item,index) in list'>
                    <div class="fl feedback_item_tit">【反馈】</div>
                    <div class="feedback_detail">
                        <p class="feedback_content">{{item.content}}</p>
                        <p class="time">{{item.updateTime}}</p>
                    </div>
                </div>
            </div>
        </div>  
       <div class="wrap clear_both">             <productfooter></productfooter>         </div>
    </div>
   
    <script src="../js/axios.js"></script>         <script src="../js/qs.js"></script>
    <script src="../js/swiper-4.3.5.min.js"></script>
    <script src="../js/browser.min.js"></script>
    <script src="../js/vue.js"></script>
    <script src="../js/element.js"></script>
    <script src="../js/main.js"></script>
    <script type="text/babel">
        var app = new Vue({
            el: '#app',
            data() {
                return {
                    name:'',
                    phone:'',
                    content:'',
                    list:''
                };
            },
            created() {
                
            },
            mounted() {
                this.listMemberUser()
            },
            methods: {
            //    保存反馈
            saveSysFeedBack(){
                axios({
                    method:"POST",
                    url:base_url + "/sysFeedBack/saveSysFeedBack",
                    data:{
                        id:'',
                        name:this.name,
                        phone:this.phone,
                        email:'',
                        content:this.content,
                    },
                    headers:{
                        'Content-Type':'application/JSON',
                        "TOKEN":localStorage.getItem('wACCESS_TOKEN')
                    }
                })
                .then(function (res) {
                    console.log(res.data)
                    if (res.data.code==1) {
                        app.name = ''
                        app.phone = ''
                        app.content = ''
                        app.$message.success("反馈成功");
                        app.listMemberUser()
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            listMemberUser(){
                axios({
                    method:"POST",
                    url:base_url + "/sysFeedBack/listMemberUser",
                    data:{
                        id:'',
                        name:this.name,
                        phone:this.phone,
                        email:'',
                        content:this.content,
                    },
                    headers:{
                        'Content-Type':'application/JSON',
                        "TOKEN":localStorage.getItem('wACCESS_TOKEN')
                    }
                })
                .then(function (res) {
                    console.log(res.data)
                    app.list = res.data.data.list.list
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            }
        })
        
    </script>
</body>

</html>